#include<func.h>
void signalHandler(int signum,siginfo_t *p,void *p1)
{
    printf("signal %d is coming !\n",signum);
}
int main()
{
    struct sigaction act;
    bzero(&act,sizeof(act));
    act.sa_sigaction=signalHandler;
    act.sa_flags=SA_SIGINFO|SA_RESETHAND;
    int ret=sigaction(SIGINT,&act,NULL);
    ERROR_CHECK(ret,-1,"sigaction");
    while(1);
    return 0;
}